{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# `EntityCharacteristics` 简介\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>YiJingFramework.EntityRelations, 4.0.1</span></li></ul></div></div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#r \"nuget:YiJingFramework.EntityRelations\"\n",
    "using YiJingFramework.EntityRelations.EntityCharacteristics.Extensions;\n",
    "using YiJingFramework.PrimitiveTypes;\n",
    "using YiJingFramework.PrimitiveTypes.GuaWithFixedCount;"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`YiJingFramework.EntityRelations.EntityCharacteristics` 命名空间主要提供易学实体的阴阳五行属性。目前包括八卦和干支的五行，举例而言："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Yang\n",
      "Jin\n",
      "Yang\n",
      "Shui\n",
      "Yin\n",
      "Mu\n"
     ]
    }
   ],
   "source": [
    "using YiJingFramework.EntityRelations.EntityCharacteristics.Extensions;\n",
    "using YiJingFramework.PrimitiveTypes;\n",
    "using YiJingFramework.PrimitiveTypes.GuaWithFixedCount;\n",
    "\n",
    "var qian = GuaTrigram.Parse(\"111\");\n",
    "Console.WriteLine(qian.Yinyang());\n",
    "Console.WriteLine(qian.Wuxing());\n",
    "\n",
    "var zi = Dizhi.Zi;\n",
    "Console.WriteLine(zi.Yinyang());\n",
    "Console.WriteLine(zi.Wuxing());\n",
    "\n",
    "var jia = Tiangan.Yi;\n",
    "Console.WriteLine(jia.Yinyang());\n",
    "Console.WriteLine(jia.Wuxing());"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "其中，关于八卦会返回如下结果：\n",
    "\n",
    "||000|001|010|011|100|101|110|\n",
    "|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|\n",
    "|阴阳|阴|阳|阳|阴|阳|阴|阴|\n",
    "|五行|土|土|水|木|木|火|金|\n",
    "\n",
    "关于天干会返回如下结果：\n",
    "\n",
    "||甲|乙|丙|丁|戊|己|庚|辛|壬|癸|\n",
    "|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|\n",
    "|阴阳|阳|阴|阳|阴|阳|阴|阳|阴|阳|阴|\n",
    "|五行|木|木|火|火|土|土|金|金|水|水|\n",
    "\n",
    "关于地支会返回如下结果：\n",
    "\n",
    "||子|丑|寅|卯|辰|巳|午|未|申|酉|戌|亥|\n",
    "|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|\n",
    "|阴阳|阳|阴|阳|阴|阳|阴|阳|阴|阳|阴|阳|阴|\n",
    "|五行|水|土|木|木|土|火|火|土|金|金|土|水|\n",
    "\n",
    "需要注意，其中地支的阴阳是相互间隔取的。部分情况下，可能使用的不是这一套阴阳。\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "file_extension": ".cs",
   "mimetype": "text/x-csharp",
   "name": "python",
   "pygments_lexer": "csharp",
   "version": "3.12.2"
  },
  "polyglot_notebook": {
   "kernelInfo": {
    "defaultKernelName": "csharp",
    "items": [
     {
      "aliases": [],
      "name": "csharp"
     }
    ]
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
